package org.example.lock;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

public class RunMain {
    public static StringBuilder result = new StringBuilder();
    public static void main(String[] args) throws ExecutionException, InterruptedException {
        MyRunnable r = new MyRunnable();
        Thread t1 = new Thread(r);
        t1.start();
        synchronized (result) {
            result.wait();
            System.out.println("获取到结果："+result);
        }
    }
}
